package com.shalanzi.hospital.controller;

import com.shalanzi.hospital.pojo.TestClass;
import com.shalanzi.hospital.service.TestService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Dream_飞翔
 * @date 2021/9/23
 * @time 20:38
 * @email 1072876976@qq.com
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Resource
    private TestService testService;

    @PostMapping("/select")
    public List<TestClass> testMethod() {
        return testService.testMethod();
    }

    @PostMapping("/add")
    public void addTest(TestClass testClass) {
        testService.addTest(testClass);
    }
}
